Comprehending queries
نویسنده
چکیده
There are no compelling reasons why database-internal query representations have to be designated by operators. This text describes a world in which datatypes determine the comprehension of queries. In this world, a datatype is characterized by its algebra of value constructors. These algebras are principal. Query operators are secondary in the sense that they simply box (recursive) programs that describe how to form a query result by application of datatype constructors. Often, operators will be unboxed to inspect and possibly rewrite these programs. Query optimization then means to deal with the transformation of programs. The predominant role of the constructor algebras suggests that this model understands queries as mappings between such algebras. The key observation that makes the whole approach viable is that (a) homomorphic mappings are expressive enough to cover declarative user query languages like OQL or recent SQL dialects, and, at the same time, (b) a single program form suffices to express homomorphisms between constructor algebras. Reliance on a single combining form, catamorphisms, renders the query programs susceptible to Constructive Algorithmics, an effective and extensive algebraic theory of program transformations. The text then takes a step from catamorphisms towards a higher-level query representation based on the categorical notion of monads. In a nutshell, monads are algebras exhibiting exactly the structure that is needed to support the interpretation of a query calculus, the monad comprehension calculus. Built on top of the abstract monad notion, the calculus maps a variety of query constructs (e. g., bulk operations, aggregates, and quantifiers) to few syntactic forms. The uniformity of the calculus facilitates the analysis and transformation, especially the normalization, of its expressions. Few but generic calculus rewriting rules suffice to implement query transformations that would otherwise require extensive rule sets. The text rediscovers well-known query optimization knowledge on sometimes unusual paths that are more practicable to follow for an optimizer, though. Solutions previously proposed by others can be simplified and generalized mainly due to the clear account of the structure of queries that the monad comprehension calculus—thanks to its density—provides. The calculus effectively supports query optimization in the presence of grouping, various forms of nesting, aggregates, and quantifiers. Although built on top of abstract concepts like homomorphisms and monads, this query model is specific enough to grasp implementation issues, such as the generation of stream-based (pipelined) query execution plans, whose treatment has traditionally been delayed until query runtime.
منابع مشابه
بهبود الگوریتم انتخاب دید در پایگاه داده تحلیلی با استفاده از یافتن پرس وجوهای پرتکرار
A data warehouse is a source for storing historical data to support decision making. Usually analytic queries take much time. To solve response time problem it should be materialized some views to answer all queries in minimum response time. There are many solutions for view selection problems. The most appropriate solution for view selection is materializing frequent queries. Previously posed ...
متن کاملImprovement of the Analytical Queries Response Time in Real-Time Data Warehouse using Materialized Views Concatenation
A real-time data warehouse is a collection of recent and hierarchical data that is used for managers’ decision-making by creating online analytical queries. The volume of data collected from data sources and entered into the real-time data warehouse is constantly increasing. Moreover, as the volume of input data to the real time data warehouse increases, the interference between online loading ...
متن کاملAn Investigation into the Effective Factors in Comprehending English Garden-Path Sentences by EFL Learners
The present study aimed at highlighting the possible effects of age, proficiency level, and the structural composition of Garden-Path (GP) sentences on EFL learners' comprehension. 80 Iranian EFL learners were recruited from the initial pool of 114 participants based on the results of an English proficiency test; 40 advanced, and 40 intermediate learners were selected. Moreover, two age...
متن کاملارائه روشی پویا جهت پاسخ به پرسوجوهای پیوسته تجمّعی اقتضایی
Data Streams are infinite, fast, time-stamp data elements which are received explosively. Generally, these elements need to be processed in an online, real-time way. So, algorithms to process data streams and answer queries on these streams are mostly one-pass. The execution of such algorithms has some challenges such as memory limitation, scheduling, and accuracy of answers. They will be more ...
متن کاملMathematics underachievers learning spatial knowledge
The relegation of spatial knowledge to a subordinate position has particular implications for examining mathematics underachievement. First, most of use have observed in our teaching that some mathematics underachievers (that is, those who have difficulty comprehending numerical ideas) can comprehend elementary spatial concepts but because they lack fluency in number they cannot make sense of t...
متن کاملBilateral brain processes for comprehending natural language.
Comprehension of natural language--stories, conversations, text--is very simple for those doing the comprehending and very complex for cognitive neuroscientists. It also presents a paradox: the advantage of the left hemisphere (LH) for most language tasks is one of the best-established facts about the brain; yet, when it comes to comprehending complex, natural language, the right hemisphere (RH...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1999